New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[qa] Test walletpassphrase timeout #7320
Conversation
Nice! But this actually does not test the issue #7316, because the reported issue can only happen when you run bitcoin-qt with |
@jonasschnelli See my "test code" ;) Are you still working on the |
@MarcoFalke: Ah. Right. Your testcode looks good. Indeed, this would catch #7316.
It's relatively far down on my priority list. But not given up... |
nodes[0].keypoolrefill(3) | ||
nodes[0].walletlock() | ||
# test walletpassphrase timeout | ||
time.sleep(1) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Concept ACK, but setting a timeout of 1 and then waiting a second is too close. A slight mistiming (e.g. busy machine) would result in a race condition, what about waiting 2 seconds instead?
fadceb7
to
fa1cb1a
Compare
nodes[0].walletlock() | ||
# test walletpassphrase timeout | ||
time.sleep(1.1) | ||
assert_equal(nodes[0].getwalletinfo()["unlocked_until"], 0) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe this ought to actually try to do something to test the wallet relocking?
fa1cb1a [qa] Test walletpassphrase timeout (MarcoFalke)
Github-Pull: bitcoin#7320 Rebased-From: fa1cb1a
Github-Pull: bitcoin#7320 Rebased-From: fa1cb1a
Test case for #7316
Test code:
$ git checkout fadceb7;make;BITCOIND=bitcoin-qt qa/pull-tester/rpc-tests.py keypool